﻿using CefSharp;
using CefSharp.WinForms;
using System;

namespace CefDemo.cef
{
    public class CefBootstrap
    {
        public static void InitCef(Action<CefSettings> action = null)
        {
            CefSharpSettings.LegacyJavascriptBindingEnabled = true;
            CefSharpSettings.WcfEnabled = true;
            Cef.EnableHighDPISupport();
            var settings = new CefSettings();
            action?.Invoke(settings);
            Cef.Initialize(settings);
        }
    }
}
